package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"zg_four_week3/esclient/internal/config"
	"zg_four_week3/esserver/esserverclient"
)

type ServiceContext struct {
	Config   config.Config
	EsServer esserverclient.Esserver
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		EsServer: esserverclient.NewEsserver(zrpc.MustNewClient(c.EsServer)),
	}
}
